package com.it.text;

import java.util.Scanner;

public class TextPayment {
    public static void main(String[] args) {

        System.out.println("--------支付菜单--------");
        System.out.println("请选择支付方式:1.支付平台支付 2.银行卡网银支付 3.信用卡支付");
        Scanner sc = new Scanner(System.in);
        int choice = sc.nextInt();

        Payment pay = null;

        switch (choice){
            case 1 :
                pay = new PlatPayment();
                break;
            case 2:
                pay = new BankcardPayment();
                break;
            case 3:
                pay = new CreditCardPayment();
                break;
            default:
                System.out.println("输入错误!");
                System.exit(0);
        }


        double money;
        System.out.print("请输入支付金额:");
        money = sc.nextDouble();

        pay.pay(money);



    }
}
